New upstream version 2.6.1
authorGraham Inggs <ginggs@debian.org>
Tue, 21 Dec 2021 11:46:07 +0000 (13:46 +0200)
committerGraham Inggs <ginggs@debian.org>
Tue, 21 Dec 2021 11:46:07 +0000 (13:46 +0200)
CMakeLists.txt
MANIFEST
Makefile
NEWS.md
test/graphemetest.c
utf8proc.c
utf8proc.h

index 59ce0f432dbb7d9d56d3eaa35aab91e6cdf8aa88..ea6b80e171908e9c7ca6088d06b91e47e203ff3f 100644 (file)
@@ -11,7 +11,7 @@ project (utf8proc C)
 # Be sure to also update these in Makefile and MANIFEST!
 set(SO_MAJOR 2)
 set(SO_MINOR 4)
-set(SO_PATCH 0)
+set(SO_PATCH 1)
 
 option(UTF8PROC_INSTALL "Enable installation of utf8proc" On)
 option(UTF8PROC_ENABLE_TESTING "Enable testing of utf8proc" Off)
index bcc5304bf163350c53a0b17c704462be8c947189..c6df660e0b73d7bc100c33bccbab5389c6c6e5e2 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -2,8 +2,8 @@ include/
 include/utf8proc.h
 lib/
 lib/libutf8proc.a
-lib/libutf8proc.so -> libutf8proc.so.2.4.0
-lib/libutf8proc.so.2 -> libutf8proc.so.2.4.0
-lib/libutf8proc.so.2.4.0
+lib/libutf8proc.so -> libutf8proc.so.2.4.1
+lib/libutf8proc.so.2 -> libutf8proc.so.2.4.1
+lib/libutf8proc.so.2.4.1
 lib/pkgconfig/
 lib/pkgconfig/libutf8proc.pc
index 3d4c2fb58cf90a35bc9b9e9ac3ef9fbebe212cf8..fa1c6b09f38ae9dae6cb887b658cd77146740fa0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,7 @@ SOFLAG = -Wl,-soname
 # Be sure to also update these ABI versions in MANIFEST and CMakeLists.txt!
 MAJOR=2
 MINOR=4
-PATCH=0
+PATCH=1
 
 OS := $(shell uname)
 ifeq ($(OS),Darwin) # MacOS X
diff --git a/NEWS.md b/NEWS.md
index 0f92be55e801f86e71157768edeecc3502ed8532..6428b8c2efc78669660ac8c416e68fc4729dfb5c 100644 (file)
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,12 @@
 # utf8proc release history #
 
+## Version 2.6.1 ##
+
+2020-12-15
+
+ - Bugfix in `utf8proc_grapheme_break_stateful` for `NULL` state argument, which
+   also broke `utf8proc_grapheme_break`.
+
 ## Version 2.6 ##
 
 2020-11-23
index 95e7dc0ecf0b462e396d0cd8bd3df4e609ac1ea4..22880fc9f145ca09bb2fb7e3b3d599e97d29d506 100644 (file)
@@ -118,6 +118,9 @@ int main(int argc, char **argv)
     checkline("/ 1f926 1f3fc 200d 2642 fe0f /", true); /* facepalm + pale skin + zwj + male sign + FE0F */
     checkline("/ 1f468 1f3fb 200d 1f91d 200d 1f468 1f3fd /", true); /* man face + pale skin + zwj + hand holding + zwj + man face + dark skin */
 
+    check(utf8proc_grapheme_break(0x03b1, 0x03b2), "failed 03b1 / 03b2 test");
+    check(!utf8proc_grapheme_break(0x03b1, 0x0302), "failed 03b1 0302 test");
+
     printf("Passed regression tests!\n");
 
     return 0;
index 5a9fbf31906578f3f64ffecb8d040355818ba072..1af3456503f8403b3d353c068de0376aa2ed08e9 100644 (file)
@@ -290,13 +290,14 @@ static utf8proc_bool grapheme_break_simple(int lbc, int tbc) {
 
 static utf8proc_bool grapheme_break_extended(int lbc, int tbc, utf8proc_int32_t *state)
 {
-  int lbc_override;
-  if (*state == UTF8PROC_BOUNDCLASS_START)
-    *state = lbc_override = lbc; 
-  else
-    lbc_override = *state;
-  utf8proc_bool break_permitted = grapheme_break_simple(lbc_override, tbc);
   if (state) {
+    int lbc_override;
+    if (*state == UTF8PROC_BOUNDCLASS_START)
+      *state = lbc_override = lbc;
+    else
+      lbc_override = *state;
+    utf8proc_bool break_permitted = grapheme_break_simple(lbc_override, tbc);
+
     // Special support for GB 12/13 made possible by GB999. After two RI
     // class codepoints we want to force a break. Do this by resetting the
     // second RI's bound class to UTF8PROC_BOUNDCLASS_OTHER, to force a break
@@ -315,8 +316,11 @@ static utf8proc_bool grapheme_break_extended(int lbc, int tbc, utf8proc_int32_t
     }
     else
       *state = tbc;
+
+    return break_permitted;
   }
-  return break_permitted;
+  else
+    return grapheme_break_simple(lbc, tbc);
 }
 
 UTF8PROC_DLLEXPORT utf8proc_bool utf8proc_grapheme_break_stateful(
index bfc62e4bf70695928e4699b8d93a73e6918ae122..2e8a7ae74cb8e9591bdc123e7f7bdfbd4c13e5c3 100644 (file)
@@ -73,7 +73,7 @@
 /** The MINOR version number (increased when new functionality is added in a backwards-compatible manner). */
 #define UTF8PROC_VERSION_MINOR 6
 /** The PATCH version (increased for fixes that do not change the API). */
-#define UTF8PROC_VERSION_PATCH 0
+#define UTF8PROC_VERSION_PATCH 1
 /** @} */
 
 #include <stdlib.h>